package com.party.core.dao.read.coupon;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.coupon.Coupon;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author：yifeng
 * @description： 券
 * @date：Created in  2017/11/27 上午 9:57
 **/
@Repository
public interface CouponReadDao extends BaseReadDao<Coupon> {
    /**
     * web端列表查询
     *
     * @param coupon
     * @param params
     * @param page
     * @return
     */
    List<Coupon> webListPage(@Param(value = "coupon") Coupon coupon, @Param(value = "params") Map<String, Object> params, Page page);

    /**
     * 根据礼包id找券集合
     *
     * @param giftId 礼包id
     * @return
     */
    List<Coupon> findByGiftId(@Param(value = "giftId") String giftId);

    Map<String,Object> findByOrderId(@Param(value = "giftOrderId") String giftOrderId);
}
